import os
import aaf
from aaf.mob import CompositionMob

output_aaf = 'resources/aaf_create.aaf'
if os.path.exists(output_aaf):
    os.remove(output_aaf)
aaf_file = aaf.open(output_aaf, 'rw')
print "[aaf_file]:" + str(aaf_file)
print

class_iid = aaf_file.class_iid
header = aaf_file.header
storage = aaf_file.storage
dictionary = aaf_file.dictionary

print "[aaf_file.class_iid]:" + str(class_iid)
print "[aaf_file.header]:" + str(header)
print "[aaf_file.storage]:" + str(storage)
print "[aaf_file.dictionary]:" + str(dictionary)
print

compositionMob = CompositionMob(aaf_file,name='TimeLineV5')

storage.add_mob(compositionMob)
aaf_file.save()
aaf_file.close()